//
//  PlayModel.m
//  TravelEveryDay
//
//  Created by 路洪宇 on 15/10/15.
//  Copyright © 2015年 com.lanou3g. All rights reserved.
//

#import "PlayModel.h"

@implementation PlayModel

////内容图像
//@property(nonatomic,strong)NSString *title_page;
////标题
//@property(nonatomic,strong)NSString *title;
////时间
//@property(nonatomic,strong)NSString *date_str;
////地址
//@property(nonatomic,strong)NSString *address;
////喜欢数
//@property(nonatomic,strong)NSString *like_count;
////标签数组
//@property(nonatomic,strong)NSArray *tab_list;
////价格
//@property(nonatomic,strong)NSString *price;
////拼接ID
//@property(nonatomic,strong)NSString *product_id;
////用户VC
//@property(nonatomic,strong)NSNumber *userId;
////用户头像
//@property(nonatomic,strong)NSString *avatar_l;
////用户名
//@property(nonatomic,strong)NSString *name;
////是否为新数据
//@property(nonatomic,strong)NSString *is_new;
////数据库编号
//@property(nonatomic,assign)NSInteger number;
#pragma mark- 编码.存储
-(void)encodeWithCoder:(NSCoder *)aCoder
{
    [aCoder encodeObject:self.title_page forKey:@ "title_page"];
    [aCoder encodeObject:self.title forKey:@"title"];
    [aCoder encodeObject:self.date_str forKey:@"date_str"];
    [aCoder encodeObject:self.title_page forKey:@"address"];
    [aCoder encodeObject:self.title forKey:@"like_count"];
    [aCoder encodeObject:self.tab_list forKey:@"tab_list"];
    [aCoder encodeObject:self.date_str forKey:@"price"];
    [aCoder encodeObject:self.title_page forKey:@"product_id"];
    [aCoder encodeObject:self.title forKey:@"userId"];
    [aCoder encodeObject:self.date_str forKey:@"avatar_l"];
    [aCoder encodeObject:self.title_page forKey:@"name"];
    [aCoder encodeObject:self.title forKey:@"is_new"];
    
    
}
#pragma mark- 解码.读取

-(id)initWithCoder:(NSCoder *)aDecoder
{
    self = [super init];
    if (self) {
        self.title_page = [aDecoder decodeObjectForKey:@"title_page"];
        self.title = [aDecoder decodeObjectForKey:@"title"];
        self.date_str = [aDecoder decodeObjectForKey:@"date_str"];
        self.address = [aDecoder decodeObjectForKey:@"address"];
        self.like_count = [aDecoder decodeObjectForKey:@"like_count"];
        self.tab_list = [aDecoder decodeObjectForKey:@"tab_list"];
        self.price = [aDecoder decodeObjectForKey:@"price"];
        self.product_id = [aDecoder decodeObjectForKey:@"product_id"];
        self.userId = [aDecoder decodeObjectForKey:@"userId"];
        self.avatar_l = [aDecoder decodeObjectForKey:@"avatar_l"];
        self.name = [aDecoder decodeObjectForKey:@"name"];
        self.is_new = [aDecoder decodeObjectForKey:@"is_new"];
    }
    return self;
}
@end
